package com.project.yuepai.controller.admin;

import com.project.yuepai.dto.MessageBean;
import com.project.yuepai.service.OrderService;
import com.project.yuepai.util.MessageUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @RequestMapping( value = "/getAgreeOrders.action",method = RequestMethod.GET)
    public MessageBean getAgreeOrders(Integer limit,Integer page,Integer activeUserRole,String activeNickName,String activePhone,
                                      Integer invitedUserRole,String invitedNickName,String invitedPhone){
        return MessageUtil.success("获取成功！",orderService.findAgreeOrders(page,limit,activeUserRole,activeNickName,activePhone,invitedUserRole,invitedNickName,invitedPhone));
    }

}
